package com.no1.musicmgr.service;

import com.no1.musicmgr.entity.Song;
import com.no1.musicmgr.mapper.SongMapper;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.extern.log4j.Log4j;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Set;

/**
 * @author 17739
 */
@Service
@Log4j
public class SongService {
    @Autowired
    private  SongMapper songMapper;

    public boolean insert(Song song) {
        return songMapper.insert(song);
    }

    public boolean deleteById(Integer songId) {
        return songMapper.deleteById(songId);
    }

    public boolean update(Song song) {
        return songMapper.update(song);
    }

    public Song selectById(Integer songId) {
        return songMapper.selectById(songId);
    }

    public ArrayList<Song> list(Song song) {
        return songMapper.list(song);
    }

    public Set<String> select(String user_id){
        return songMapper.select(user_id);
    }

}
